import 'package:flutter/material.dart';
import 'dart:ui';

class HomeCell extends StatelessWidget {
  final index;
  final text;
  final color;

  HomeCell(this.index, this.text, this.color);

  @override
  Widget build(BuildContext context) {
    return new Column(
      children: <Widget>[
        new Container(
//          margin: const EdgeInsets.symmetric(vertical: 2),
          decoration: new BoxDecoration(
            //设置Border属性给容器添加边框
              border: new Border(
                  left: BorderSide(width: 4.0, color: this.color))),
          child: new Container(
            // 盒子样式
            decoration: new BoxDecoration(
              color: this.color[100]
            ),
            child: Row(
              children: <Widget>[
                Column(
                  crossAxisAlignment: CrossAxisAlignment.end,
                  children: <Widget>[
                    new Container(
                      //宽度
                      width: 200,
                      // 盒子样式
                      decoration: new BoxDecoration(
//                            color: Colors.purple,
                      ),
                      child: Padding(
                        padding: EdgeInsets.only(top: 8, left: 8),
                        child: Text(
                          this.text,
                          style: TextStyle(fontSize: 20),
                        ),
                      ),
                    ),
                    new Padding(
                      padding: EdgeInsets.only(top: 4),
                      child: Text(
                        "还有",
                        style: TextStyle(fontSize: 12),
                      ),
                    ),
                  ],
                ),
                Expanded(
                  child: new Row(
                    mainAxisAlignment: MainAxisAlignment.end,
                    children: <Widget>[
                      Text(
                        "10天",
                        style: TextStyle(
                            fontSize: 22, fontWeight: FontWeight.bold),
                      ),
                    ],
                  ),
                )
              ],
            ),
          ),
        ),
        Container(
            decoration: BoxDecoration(
              border: Border(
                bottom: BorderSide(
                  width: 0.5,
                  color: Colors.grey,
                ),
              ),
            ))
      ],
    );
  }
}


//Padding(
//              padding: const EdgeInsets.all(8),
//              child: Row(
//                children: <Widget>[
//
//                  Column(
//                    crossAxisAlignment: CrossAxisAlignment.start,
//                    children: <Widget>[
//                      Padding(
//                        padding: const EdgeInsets.only(
//                          left: 8,
//                          bottom: 4,
//                        ),
//                        child: Container(
//                          width: 200,
//                          child: Text(
//                            "lalalalalalalalalalalalalalalalalalalalalalalalalalalalalala",
//                            style: TextStyle(
//                              fontSize: 16,
//                              fontWeight: FontWeight.bold,
//                            ),
//                          ),
//                        ),
//                      ),
//                      Padding(
//                        padding: const EdgeInsets.only(left: 8, bottom: 4),
//                        child: Text(
//                          "erererere",
//                          style: TextStyle(fontSize: 16),
//                        ),
//                      ),
//                      Padding(
//                        padding: const EdgeInsets.only(left: 8, bottom: 4),
//                        child: Text(
//                          "sansansan",
//                          style: TextStyle(color: Colors.grey, fontSize: 16),
//                        ),
//                      ),
//                    ],
//                  ),
//                  Expanded(
//                    child: Column(
//                      mainAxisAlignment: MainAxisAlignment.start,
//                      crossAxisAlignment: CrossAxisAlignment.end,
//                      children: <Widget>[
//                        Padding(
//                          padding: const EdgeInsets.only(
//                            left: 0,
//                            bottom: 0,
//                          ),
//                          child: Text(
//                            "22222",
//                            style: TextStyle(
//                              fontSize: 24,
//                              fontWeight: FontWeight.bold,
//                            ),
//                          ),
//                        ),
//                        Row(
//                          mainAxisAlignment: MainAxisAlignment.end,
//                          children: <Widget>[
//                            Text("sisisisi",
//                                style: TextStyle(
//                                    color: Colors.grey, fontSize: 14)),
//                            Container(
//                              margin:
//                                  const EdgeInsets.symmetric(horizontal: 8.0),
//                              width: 8.0,
//                              height: 8.0,
//                              child: CircleAvatar(
//                                backgroundColor: Colors.blue,
//                              ),
//                            ),
//                          ],
//                        ),
//                      ],
//                    ),
//                  )
//                ],
//              )),
